package com.sky.handler;

import com.sky.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @ClassName: GlobalExceptionHandler
 * @Author: zw
 * @Description: 出百万拳，行万里路；
 * @Create 2025/6/15-17:34
 * @Version 1.0
 */
@RestControllerAdvice
@Slf4j
public class GlobalExceptionHandler {
    public Result exceptionHandler(Exception ex) {
        log.info("异常信息，{}",ex.getMessage());
        return Result.error(ex.getMessage());
    }
}
